﻿Public Class DanhSachSinhVien

    Dim MaLop As Object
    Private _p1 As Object

    Sub New(ByVal p1 As Object)
        ' TODO: Complete member initialization 
        _p1 = p1
    End Sub

    Private Property str As String

    Private Sub DanhSachSinhVien_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub btnChiTiet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChiTiet.Click
        'Dim str As String
        Dim row As Integer = Me.listView1.SelectedItems(0).Index
        str = Me.listView1.Items(row).SubItems(0).Text
        Dim frm As ChitietSV = New ChitietSV(str)

        frm.Show()
    End Sub

    Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
        Dim frmthem As New ThemSinhVien()
        frmthem.Show()
        Me.Close()
    End Sub

    Private Sub button2_Click(sender As System.Object, e As System.EventArgs) Handles button2.Click
        Dim str As String
        Dim row As Integer = Me.listView1.SelectedItems(0).Index
        str = Me.listView1.Items(row).SubItems(0).Text
        Dim frm As New SuaDSSinhVien(str, MaLop)
        frm.Show()
        Me.Close()
    End Sub

    Private Sub button3_Click(sender As System.Object, e As System.EventArgs) Handles button3.Click
        Dim str As String
        Dim row As Integer = Me.listView1.SelectedItems(0).Index
        str = Me.listView1.Items(row).SubItems(0).Text
        Dim frm As New XoaSinhVien(str, MaLop)
        frm.Show()
        Me.Close()

    End Sub

    Private Sub button4_Click(sender As System.Object, e As System.EventArgs) Handles button4.Click
        Me.Close()
    End Sub
End Class